﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Web;
using Htss.Platform.Data;
namespace DreamBox.DAL
{
    public class SiteConfig
    {
        private readonly static SiteConfig _config = new SiteConfig();

        public static SiteConfig Config
        {
            get { return SiteConfig._config; }
        } 

        /// <summary>
        /// 构造函数
        /// </summary>
        SiteConfig() 
        {
            string sqlsys = "select ConfigID,SiteName,SiteUrl,Title,KeyWords,Description,ICP,CopyRight from dbox_Config where ConfigID=1";

            DbAction action = new DbAction();

            DataTable dt = action.Select(sqlsys, true);
            foreach (DataRow row in dt.Rows)
            {
                ConfigID = int.Parse(row["ConfigID"].ToString());
                SiteName = row["SiteName"].ToString();
                SiteUrl = row["SiteUrl"].ToString();
                Title = row["Title"].ToString();
                KeyWords = row["KeyWords"].ToString();
                Description = row["Description"].ToString();
                ICP = row["ICP"].ToString();
                CopyRight = row["CopyRight"].ToString();
            }
        }
        /// <summary>
        /// 配置ID
        /// </summary>
        public int ConfigID
        {
            get ; 
            set ; 
        }
        /// <summary>
        /// 网站名称
        /// </summary>
        public string SiteName
        {
            get ; 
            set ; 
        }
        /// <summary>
        /// 网站地址
        /// </summary>
        public string SiteUrl
        {
            get ; 
            set ; 
        }
        /// <summary>
        /// 网站标题
        /// </summary>
        public string Title
        {
            get ; 
            set ; 
        }
        /// <summary>
        /// 网站关键字
        /// </summary>
        public string KeyWords
        {
            get ; 
            set ; 
        }
        /// <summary>
        /// 网站描述
        /// </summary>
        public string Description
        {
            get ; 
            set ; 
        }
        /// <summary>
        /// ICP备案
        /// </summary>
        public string ICP
        {
            get ; 
            set ; 
        }
        /// <summary>
        /// 版权说明
        /// </summary>
        public string CopyRight
        {
            get;
            set;
        }
    }
}
